package controllers;

import java.util.ArrayList;
import java.util.List;

import controllers.securesocial.SecureSocial;

import models.Plan;
import play.db.Model;
import play.mvc.With;

@With(SecureSocial.class)
public class Nutris extends CustomCRUD {    
	
	protected static List<Model>filterList(List<Model> objects, String userId) {
        
		List<Model> filteredObjects = new ArrayList<Model>();
		
		for (Model model : objects) {
			if (((Plan)model).getUsuario().id.toString().equals(userId)) {
				filteredObjects.add(model);
			}
		}
        
		return filteredObjects;

	}
	
}
